#!/usr/bin/env python3
import os
import sys

# 添加项目根目录到Python路径
sys.path.insert(0, os.path.dirname(__file__))

from flask import Flask
from flask_cors import CORS
from src.routes.api import api_bp

app = Flask(__name__)
app.config["SECRET_KEY"] = "asdf#FGSgvasgf$5$WGT"

# 启用CORS
CORS(app)

app.register_blueprint(api_bp)

if __name__ == '__main__':
    print("启动SSH远程控制工具中继服务器...")
    print("服务器地址: http://0.0.0.0:5001")
    print("API状态: http://0.0.0.0:5001/api/status")
    app.run(host='0.0.0.0', port=5001, debug=False)


